Fix tvpassport.com timezone to be dynamic from the content#3025
Open
dblake10 wants to merge 2 commits intoiptv-org:masterfrom
Open
Fix tvpassport.com timezone to be dynamic from the content#3025dblake10 wants to merge 2 commits intoiptv-org:masterfrom
dblake10 wants to merge 2 commits intoiptv-org:masterfrom
Conversation
Uses the timezone from the selected timezone of the dropdown on the page, instead of always hardcoding America/New_York. This fixes an offset I was having from pulling the guide from an IP address in the central timezone.
fuentesvazquezjoseeduardo
approved these changes
Feb 24, 2026
Added optional chaining on elements that are expected to not exist on the guide listings such as 'episodetitle' and 'year', this fixes the pull for 25 channels that were failing (out of 19,287 channels).
Author
|
Added optional chaining on elements that are expected to not exist on the guide listings such as 'episodetitle' and 'year', this fixes the pull for 25 channels that were failing (out of 19,287 channels) Testsnpm test --- tvpassport.com
> test
> cross-env TZ=Pacific/Nauru npx jest --runInBand tvpassport.com
PASS sites/tvpassport.com/tvpassport.com.test.js
✓ can generate valid url (4 ms)
✓ can parse response (197 ms)
✓ can handle empty guide (1 ms)
Test Suites: 1 passed, 1 total
Tests: 3 passed, 3 total
Snapshots: 0 total
Time: 0.594 s, estimated 1 s
Ran all test suites matching tvpassport.com.Grab * - Only showing channels that previously failednpm run grab --- --channels=public/channels.xml --output=tvpassport_tostring_guide.xml --days=1
> grab
> tsx scripts/commands/epg/grab.ts --channels=public/channels.xml --output=tvpassport_tostring_guide.xml --days=1
info starting...
info loading channels...
info found 25 channel(s)
info loading api data...
info creating queue...
info run:
info [1/25] tvpassport.com (en) - beetv-network-wcac-lagrange-ga/5906 - Feb 25, 2026 (48 programs)
info [2/25] tvpassport.com (en) - bein-sports-xtra-kzcz7-college-station-tx/33842 - Feb 25, 2026 (40 programs)
info [3/25] tvpassport.com (en) - dabl-krzg-harlingen-tx/18462 - Feb 25, 2026 (40 programs)
info [4/25] tvpassport.com (en) - daystar-wmwd-ld2-madison-wi/35938 - Feb 25, 2026 (40 programs)
info [5/25] tvpassport.com (en) - daystar-sd-wkdc-ld2-columbia-sc/31149 - Feb 25, 2026 (40 programs)
info [6/25] tvpassport.com (en) - cctv-4-wxny-ld2-new-york-ny/16443 - Feb 25, 2026 (40 programs)
info [7/25] tvpassport.com (en) - daystar-klvd-ld2-las-vegas-nv/18655 - Feb 25, 2026 (40 programs)
info [8/25] tvpassport.com (en) - daystar-espanol-wilc-cd-sugar-grove-il/37448 - Feb 25, 2026 (40 programs)
info [9/25] tvpassport.com (en) - daystar-kdph-ld2-phoenix-az/18021 - Feb 25, 2026 (40 programs)
info [10/25] tvpassport.com (en) - almavision-ktvs-ld2-albuquerque-nm/18390 - Feb 25, 2026 (40 programs)
info [11/25] tvpassport.com (en) - WildTV.ca@SD - Feb 25, 2026 (48 programs)
info [12/25] tvpassport.com (en) - telemar-wost-mayaguez-puerto-rico/18797 - Feb 25, 2026 (9 programs)
info [13/25] tvpassport.com (en) - god-tv-k11vz-d2-chico-ca/18239 - Feb 25, 2026 (40 programs)
info [14/25] tvpassport.com (en) - pbs-w44cr-youngstown-oh/12585 - Feb 25, 2026 (34 programs)
info [15/25] tvpassport.com (en) - pbs-weao-akron-oh-hd/4737 - Feb 25, 2026 (34 programs)
info [16/25] tvpassport.com (en) - pbs-weao-akron-oh/3015 - Feb 25, 2026 (34 programs)
info [17/25] tvpassport.com (en) - pbs-wneo-alliance-oh/3014 - Feb 25, 2026 (34 programs)
info [18/25] tvpassport.com (en) - pbs-wneo-alliance-oh-hd/8820 - Feb 25, 2026 (34 programs)
info [19/25] tvpassport.com (en) - sonlife-network-knla-los-angeles-ca/11169 - Feb 25, 2026 (40 programs)
info [20/25] tvpassport.com (en) - wild-tv-hd/6781 - Feb 25, 2026 (48 programs)
info [21/25] tvpassport.com (en) - iqra-kegs-dt5-las-vegas-nv/15596 - Feb 25, 2026 (9 programs)
info [22/25] tvpassport.com (en) - newsnet-wivm-ld4-canton-oh/34694 - Feb 25, 2026 (37 programs)
info [23/25] tvpassport.com (en) - infomercials-wqeo-ld4-memphis-tn/36619 - Feb 25, 2026 (9 programs)
info [24/25] tvpassport.com (en) - fox-kwbm-dt2-springfield-mo/2329 - Feb 25, 2026 (40 programs)
info [25/25] tvpassport.com (en) - gettv-wrnt-ld2-hartford-ct/17580 - Feb 25, 2026 (40 programs)
info saving to "tvpassport_tostring_guide.xml"...
info saving to "tvpassport_tostring_guide.xml.gz"...
success done in 00h 00m 01s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uses the timezone from the selected timezone of the dropdown on the page, instead of always hardcoding America/New_York. This fixes an offset I was having from pulling the guide from an IP address in the central timezone.
Tests
Grab (73 errors, 19287 channels) * - Showing errors only